package com.iteaj.iot.client.udp;

import com.iteaj.iot.client.ClientRequestProtocol;
import com.iteaj.network.ProtocolType;
import com.iteaj.network.client.ClientMessage;
import io.netty.channel.socket.DatagramPacket;

public abstract class UdpRequestProtocol<M extends ClientMessage> extends ClientRequestProtocol<M> {

    private DatagramPacket packet;

    @Override
    protected UdpNettyClient getIotNettyClient() {
        return (UdpNettyClient) super.getIotNettyClient();
    }

    @Override
    public abstract ProtocolType protocolType();

    public DatagramPacket getPacket() {
        return packet;
    }

    public void setPacket(DatagramPacket packet) {
        this.packet = packet;
    }
}
